package org.jivesoftware.smackx;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;

public class RemoteRosterEntry
{
  private final List<String> groupNames = new ArrayList();
  private String name;
  private String user;

  public RemoteRosterEntry(String paramString1, String paramString2, String[] paramArrayOfString)
  {
    this.user = paramString1;
    this.name = paramString2;
    if (paramArrayOfString != null)
      this.groupNames.addAll(Arrays.asList(paramArrayOfString));
  }

  public String[] getGroupArrayNames()
  {
    synchronized (this.groupNames)
    {
      String[] arrayOfString = (String[])Collections.unmodifiableList(this.groupNames).toArray(new String[this.groupNames.size()]);
      return arrayOfString;
    }
  }

  public Iterator getGroupNames()
  {
    synchronized (this.groupNames)
    {
      Iterator localIterator = Collections.unmodifiableList(this.groupNames).iterator();
      return localIterator;
    }
  }

  public String getName()
  {
    return this.name;
  }

  public String getUser()
  {
    return this.user;
  }

  // ERROR //
  public String toXML()
  {
    // Byte code:
    //   0: new 67	java/lang/StringBuilder
    //   3: dup
    //   4: invokespecial 68	java/lang/StringBuilder:<init>	()V
    //   7: astore_1
    //   8: aload_1
    //   9: ldc 70
    //   11: invokevirtual 74	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   14: aload_0
    //   15: getfield 22	org/jivesoftware/smackx/RemoteRosterEntry:user	Ljava/lang/String;
    //   18: invokevirtual 74	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   21: ldc 76
    //   23: invokevirtual 74	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   26: pop
    //   27: aload_0
    //   28: getfield 24	org/jivesoftware/smackx/RemoteRosterEntry:name	Ljava/lang/String;
    //   31: ifnull +22 -> 53
    //   34: aload_1
    //   35: ldc 78
    //   37: invokevirtual 74	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   40: aload_0
    //   41: getfield 24	org/jivesoftware/smackx/RemoteRosterEntry:name	Ljava/lang/String;
    //   44: invokevirtual 74	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   47: ldc 76
    //   49: invokevirtual 74	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   52: pop
    //   53: aload_1
    //   54: ldc 80
    //   56: invokevirtual 74	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   59: pop
    //   60: aload_0
    //   61: getfield 20	org/jivesoftware/smackx/RemoteRosterEntry:groupNames	Ljava/util/List;
    //   64: astore 4
    //   66: aload 4
    //   68: monitorenter
    //   69: aload_0
    //   70: getfield 20	org/jivesoftware/smackx/RemoteRosterEntry:groupNames	Ljava/util/List;
    //   73: invokeinterface 61 1 0
    //   78: astore 6
    //   80: aload 6
    //   82: invokeinterface 86 1 0
    //   87: ifne +18 -> 105
    //   90: aload 4
    //   92: monitorexit
    //   93: aload_1
    //   94: ldc 88
    //   96: invokevirtual 74	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   99: pop
    //   100: aload_1
    //   101: invokevirtual 91	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   104: areturn
    //   105: aload 6
    //   107: invokeinterface 95 1 0
    //   112: checkcast 50	java/lang/String
    //   115: astore 7
    //   117: aload_1
    //   118: ldc 97
    //   120: invokevirtual 74	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   123: aload 7
    //   125: invokevirtual 74	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   128: ldc 99
    //   130: invokevirtual 74	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   133: pop
    //   134: goto -54 -> 80
    //   137: astore 5
    //   139: aload 4
    //   141: monitorexit
    //   142: aload 5
    //   144: athrow
    //
    // Exception table:
    //   from	to	target	type
    //   69	93	137	finally
    //   105	142	137	finally
  }
}